import request from "@/utils/request";

// 查询功能房列表
export function listRoom(query) {
  return request({
    url: "/routine/room/list",
    method: "get",
    params: query,
  });
}

// 查询功能房详细
export function getRoom(id) {
  return request({
    url: "/routine/room/" + id,
    method: "get",
  });
}

// 新增功能房
export function addRoom(data) {
  return request({
    url: "/routine/room/add",
    method: "post",
    data: data,
  });
}

// 修改功能房
export function updateRoom(data) {
  return request({
    url: "/routine/room/update",
    method: "post",
    data: data,
  });
}

// 删除功能房
export function delRoom(id) {
  return request({
    url: "/routine/room/" + id,
    method: "post",
  });
}

// 修改功能房状态
export function updateStatus(id, status) {
  const data = {
    id,
    status,
  };
  return request({
    url: "/routine/room/changeStatus/update",
    method: "post",
    data: data,
  });
}
// 获取功能房使用详细信息
export function getfuDetail(rono) {
  return request({
    url: "/routine/reservation/getroTimeinfo/"+rono,
    method: "get",
  });
}

export function getfuTime(data) {
  return request({
    url: "/routine/reservation/list",
    method: "get",
    data:data
  });
}
